package cn.project;

import cn.project.dao.UserTempDao;
import cn.project.model.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test3 {
    @Test
    public void demo3(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserTempDao userTempDao=ac.getBean("userDaoJdbcSupport", UserTempDao.class);
        User user=new User();
        user.setUsername("悟空");
        user.setPassword("123");
        userTempDao.save(user);
    }

}
